<template>
  <el-dialog title="编辑" :visible.sync="dialogVisible" width="40%" @close="winclose">

    <span slot="footer" class="dialog-footer">

      <el-form ref="form" :model="form" label-width="80px" :label-position="labelPosition">
        <el-form-item label="姓名">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="关键词">
          <el-input v-model="form.KeyWords" />
        </el-form-item>
        <el-form-item label="打卡时间">
          <el-col :span="8">
            <el-date-picker v-model="form.Punch" type="date" placeholder="选择日期">
            </el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="sex">
          <el-input v-model="form.sex" />
        </el-form-item>
        <el-form-item label="年龄">
          <el-input v-model="form.age" />
        </el-form-item>
        <el-form-item label="生日">
          <el-col :span="8">
            <el-date-picker v-model="form.birthday" type="date" placeholder="选择日期">
            </el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="邮箱">
          <el-input v-model="form.email" />
        </el-form-item>
        <el-form-item label="个人简介">
          <el-input v-model="form.oneself" />
        </el-form-item>

      </el-form>

      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
    form: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      labelPosition: 'left'
    }
  },
  methods: {
    winclose() {
      this.$emit('update:dialogVisible', false);
      this.form = {
        checkeds: false,
        name: '王小虎',
        KeyWords: '小王',
        Punch: '2019-11-26 16:14:06',
        sex: '男',
        age: 22,
        birthday: '2000-12-06',
        email: '21313251@3211.com',
        oneself: '哈哈哈哈哈哈哈'
      }
    }
  }
}
</script>
<style scoped></style>
